<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
      <el-form-item label="供应商名称" prop="hbName">
        <el-input
          v-model="queryParams.hbName"
          placeholder="请输入供应商名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="合同签订日期" prop="contractQdDate" label-width="120">
        <el-date-picker clearable
          v-model="queryParams.contractQdDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择合同签订日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="创建日期" prop="createDate">
        <el-date-picker
          v-model="queryParams.createDate"
          type="date"
          placeholder="选择日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['sales:contract:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['sales:contract:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['sales:contract:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="info"
          plain
          icon="el-icon-upload2"
          size="mini"
          @click="handleImport"
        >导入</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['sales:contract:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table height="calc(100vh - 300px)" v-loading="loading" :data="contractList"
              @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="公司代码" align="center" prop="gcCode" />
      <el-table-column label="公司名称" align="center" prop="gcName" />
      <el-table-column label="合同编号" align="center" prop="contractId" width="130">
        <template slot-scope="scope">
          <div style="cursor:pointer;text-decoration:underline;color: blue" class="teamUserNum" @click="htInfo(scope.row)">{{ scope.row.contractId }}</div>
        </template>
      </el-table-column>
      <el-table-column label="客户合同号" align="center" prop="clientContractNo" width="200"/>
      <el-table-column label="供应商名称" align="center" prop="hbName" width="200" show-overflow-tooltip/>
<!--      <el-table-column label="伙伴类型" align="center" prop="hbType" />-->
      <el-table-column label="供应商代码" align="center" prop="hbCode" width="120"/>
      <el-table-column label="供应商税号" align="center" prop="hbShuihao" width="200"/>
      <el-table-column label="供应商地址" align="center" prop="hbAddress" width="140" show-overflow-tooltip/>
      <el-table-column label="供应商电话" align="center" prop="hbPhone" width="120"/>
      <el-table-column label="供应商开户银行" align="center" prop="hbBank" width="130"/>
      <el-table-column label="供应商账号" align="center" prop="hbCard" width="140"/>
      <el-table-column label="供应商联系人" align="center" prop="hbName2" width="130"/>
      <el-table-column label="供应商联系电话" align="center" prop="hbPhone2" width="130"/>
      <el-table-column label="合同签订日期" align="center" prop="contractQdDate" width="130">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.contractQdDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="合同交货日期" align="center" prop="contractJhDate" width="130">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.contractJhDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="合同签订人" align="center" prop="contractQdName" width="130"/>
<!--      <el-table-column label="是否生成订单" align="center" prop="isGenOrder" width="140" >-->
<!--        <template slot-scope="scope">-->
<!--          <span v-if="scope.row.isGenOrder=='0'">未生成</span>-->
<!--          <span v-if="scope.row.isGenOrder=='1'" style="color: #13ce66">已生成</span>-->
<!--        </template>-->
<!--      </el-table-column>-->
      <el-table-column label="附件" align="center" prop="attach" width="120">
        <template slot-scope="scope">
          <el-button
            type="text"
            size="small"
            icon="el-icon-view"
            v-if="scope.row.attach!=null"
            @click="showAnnex(scope.row)"
          >附件查看</el-button
          >
        </template>
      </el-table-column>
      <el-table-column label="创建人" align="center" prop="createBy" />
      <el-table-column label="创建时间" align="center" prop="createTime"  width="160"/>
<!--      <el-table-column label="备注" width="120" show-overflow-tooltip align="center" prop="remark" />-->
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="190">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-document"
            @click="handleDetial(scope.row)"
          >查看详情</el-button>
          <el-button
            size="mini"
            v-if="scope.row.isGenOrder=='0'"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['sales:contract:edit']"
          >编辑</el-button>
          <el-button
            size="mini"
            v-if="scope.row.isGenOrder=='0'"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['sales:contract:remove']"
          >删除</el-button>

        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改合同管理表对话框 -->
    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="1200px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="公司名称" prop="gcName">
              <el-select @change="gcCodeSelect" v-model="form.gcName" placeholder="请选择伙伴">
                <el-option
                  v-for="item in gcCodeList"
                  :key="item.jtdm"
                  :label="item.jtmc"
                  :value="item.jtdm">
                  <span style="float: left">{{ item.jtmc }}</span>
                  <span style="float: right; color: #8492a6; font-size: 13px">{{ item.jtdm }}</span>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="公司代码" prop="gcCode">
              <el-input v-model="form.gcCode" placeholder="请输入公司代码" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="供应商名称" prop="hbName">
              <el-select @change="nameSelect" v-model="form.hbName" placeholder="请选择供应商">
                <el-option
                  v-for="item in hbList"
                  :key="item.supplierCode"
                  :label="item.supplierName"
                  :value="item.supplierCode">
                  <span style="float: left">{{ item.supplierName }}</span>
                  <span style="float: right; color: #8492a6; font-size: 13px">{{ item.supplierCode }}</span>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="供应商代码" prop="hbCode">
              <el-input v-model="form.hbCode" placeholder="请输入供应商代码" />
            </el-form-item>
          </el-col>

        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="供应商税号" prop="hbShuihao">
              <el-input v-model="form.hbShuihao" placeholder="请输入供应商税号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="供应商地址" prop="hbAddress">
              <el-input v-model="form.hbAddress" placeholder="请输入供应商地址" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="供应商电话" prop="hbPhone">
              <el-input v-model="form.hbPhone" placeholder="请输入供应商电话" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="供应商开户银行" prop="hbBank">
              <el-input v-model="form.hbBank" placeholder="请输入供应商开户银行" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="供应商账号" prop="hbCard">
              <el-input v-model="form.hbCard" placeholder="请输入供应商账号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="供应商联系人" prop="hbName2">
              <el-input v-model="form.hbName2" placeholder="请输入供应商联系人" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="供应商联系电话" prop="hbPhone2">
              <el-input v-model="form.hbPhone2" placeholder="请输入供应商联系电话" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="合同签订日期" prop="contractQdDate">
              <el-date-picker clearable
                              v-model="form.contractQdDate"
                              type="date"
                              value-format="yyyy-MM-dd"
                              placeholder="请选择合同签订日期">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>


        <el-row>
          <el-col :span="12">
            <el-form-item label="合同交货日期" prop="contractJhDate">
              <el-date-picker clearable
                              v-model="form.contractJhDate"
                              type="date"
                              value-format="yyyy-MM-dd"
                              placeholder="请选择合同交货日期">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="合同签订人" prop="contractQdName">
              <el-input v-model="form.contractQdName" placeholder="请输入合同签订人" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="客户合同号">
              <el-input v-model="form.clientContractNo" placeholder="请输入客户合同号" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="附件">
              <file-upload v-model="form.attach"/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="合同说明" prop="remark">
              <el-input autosize type="textarea" v-model="form.remark" placeholder="请输入合同说明"/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <PurchaseInfoAdd ref="purchaseInfoAdd"></PurchaseInfoAdd>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm" v-show="isShow">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
      <el-upload
        ref="upload"
        :limit="1"
        accept=".xlsx, .xls"
        :headers="upload.headers"
        :action="upload.url + '?updateSupport=' + upload.updateSupport"
        :disabled="upload.isUploading"
        :on-progress="handleFileUploadProgress"
        :on-success="handleFileSuccess"
        :auto-upload="false"
        drag
      >
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
          <!--  <div class="el-upload__tip" slot="tip">
              <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
            </div>-->
          <span>仅允许导入xls、xlsx格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
        </div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFileForm" >确 定</el-button>
        <el-button @click="upload.open = false">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog :close-on-click-modal="false" title="合同详情" :visible.sync="wuOpen" width="1200px" append-to-body>
      <el-table  :data="itembzinfoList" >
        <el-table-column label="序号" width="50px" align="center">
          <template slot-scope="scope">
            {{ scope.$index + 1 }}
          </template>
        </el-table-column>
        <el-table-column label="物料名称" fixed="left"  align="center" prop="itemName" />
        <el-table-column label="物料编码" fixed="left"  align="center" prop="item" />
        <el-table-column label="规格型号" fixed="left"   align="center" prop="spec" />
        <el-table-column label="单位" fixed="left"   align="center" prop="unit" />
        <el-table-column label="合同单价" fixed="left"   align="center" prop="contractUnitPrice" />
        <el-table-column label="计划单价" fixed="left"   align="center" prop="jhUnitPrice" />
        <el-table-column label="合同数量" fixed="left"   align="center" prop="contractNum" />
        <el-table-column label="备注" align="center" prop="remark" />
      </el-table>
    </el-dialog>
  </div>
</template>

<style>
.el-table .warning-row {
  background: oldlace;
}

.el-table .success-row {
  background: #f0f9eb;
}
</style>
<script>
import { listContract2, getContractDetail,getContract, delContract, addContract, updateContract,scOrder} from "@/api/sales/contract";
import {getLiSupplier} from "@/api/supplychain/supplier";
import {listAllOrgManage} from "@/api/hr/orgManage";
import {getToken} from "@/utils/auth";
import moment from "moment";
import PurchaseInfoAdd from '@/components/jcItemInfoSelect/purchaseInfoAdd';


export default {
  name: "Contract",
  components: {PurchaseInfoAdd},
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      wuOpen: false,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      fullscreenLoading:false,
      // 总条数
      total: 0,
      // 合同管理表表格数据
      contractList: [],
      itembzinfoList: [],
      hbList:[],
      gcCodeList:[],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      isShow: true,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        gcCode: null,
        gcName: null,
        contractDate: null,
        hbType: null,
        hbCode: null,
        hbName: null,
        hbShuihao: null,
        hbAddress: null,
        hbPhone: null,
        hbBank: null,
        hbCard: null,
        hbName2: null,
        hbPhone2: null,
        contractId: null,
        contractQdDate: null,
        contractJhDate: null,
        contractQdName: null,
        item: null,
        itemName: null,
        spec: null,
        unit: null,
        contractUnitPrice: null,
        contractNum: null,
        jingbanren: null,
        tichengBili: null,
        tichengMoney: null,
        attach: null,
        remark: null,
        type: "2",
        createDate:new Date()
      },
      // 表单参数
      form: {},

      upload: {
        // 是否显示弹出层（物料导入）
        open: false,
        // 弹出层标题（物料导入）
        title: "导入合同信息",
        // 是否禁用上传
        isUploading: false,
        // 是否更新已经存在的用户数据
        updateSupport: 0,
        // 设置上传的请求头部
        headers: { Authorization: "Bearer " + getToken() },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/sales/contract/importData"
      },
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
    getLiSupplier().then(response => {
      this.hbList = response.data;
    });
    listAllOrgManage(this.queryParams2).then(response => {
      this.gcCodeList = response.rows;
    });
  },
  filters: {
    numFilter (value) {
      // 截取当前数据到小数点后两位
      let realVal = parseFloat(value).toFixed(2)
      return realVal
    }
  },
  methods: {
    /** 查询合同管理表列表 */
    getList() {
      this.loading = true;
      this.queryParams.createDate = moment.utc(this.queryParams.createDate).local().format('YYYY-MM-DD')
      if(this.queryParams.createDate == 'Invalid date'){
        this.queryParams.createDate = null
      }
      listContract2(this.queryParams).then(response => {
        this.contractList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        uuid: null,
        gcCode: null,
        gcName: null,
        contractDate: null,
        hbType: null,
        hbCode: null,
        hbName: null,
        hbShuihao: null,
        hbAddress: null,
        hbPhone: null,
        hbBank: null,
        hbCard: null,
        hbName2: null,
        hbPhone2: null,
        contractId: null,
        contractQdDate: null,
        contractJhDate: null,
        contractQdName: null,
        item: null,
        itemName: null,
        spec: null,
        unit: null,
        contractUnitPrice: null,
        contractNum: null,
        jingbanren: null,
        tichengBili: null,
        tichengMoney: null,
        attach: null,
        remark: null

      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.uuid)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.isShow = true;
      this.title = "添加合同管理表";
      setTimeout(() => {
        this.$refs.purchaseInfoAdd.purchaseInfoAddListReset();
      }, 10);
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const uuid = row.uuid || this.ids
      getContract(uuid).then(response => {
        this.form = response.data;
        this.open = true;
        this.isShow = true;
        this.title = "修改合同管理表";
        setTimeout(() => {
          this.$refs.purchaseInfoAdd.purchaseInfoEditListReset(response.data.jcIteminfoList,'update');
        }, 10);
      });

    },
    /** 修改按钮操作 */
    handleDetial(row) {
      this.reset();
      const uuid = row.uuid || this.ids
      getContract(uuid).then(response => {
        this.form = response.data;
        this.open = true;
        this.isShow = false;
        this.title = "查看合同管理";
        setTimeout(() => {
          this.$refs.purchaseInfoAdd.purchaseInfoEditListReset(response.data.jcIteminfoList,'show');
        }, 10);
      });

    },
    gcCodeSelect(e){
      let result = this.gcCodeList.find(item => item.jtdm ==e)
      this.form.gcName = result.jtmc
      this.form.gcCode = result.jtdm
      // this.hbList.filter(item=>{})
    },
    /** 提交按钮 */
    submitForm() {
      let purchaseInfoAddList= this.$refs.purchaseInfoAdd.purchaseInfoAddList;
      if(purchaseInfoAddList.length==0){
        this.$modal.alertWarning('请选择物料')
        return;
      }
      for(let i=0;i<purchaseInfoAddList.length;i++){
        if(purchaseInfoAddList[i].yhNum==''||purchaseInfoAddList[i].yhNum==null||purchaseInfoAddList[i].yhNum==undefined ||purchaseInfoAddList[i].yhNum<=0){
          this.$modal.alertWarning('请输入合同数量')
          return;
        }
        // if(purchaseInfoAddList[i].unitPrice==''||purchaseInfoAddList[i].unitPrice==null||purchaseInfoAddList[i].unitPrice==undefined|| purchaseInfoAddList[i].unitPrice<=0){
        //   this.$modal.alertWarning('请输入合同单价')
        //   return;
        // }
      }
      this.form.jcIteminfoList=JSON.parse(JSON.stringify(purchaseInfoAddList));
      console.log(this.form.jcIteminfoList,"this.form.jcIteminfoList");
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.uuid != null) {
            updateContract(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            console.log("this.form",this.form);
            this.form.type = "2";
            addContract(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const uuids = row.uuid || this.ids;
      this.$modal.confirm('是否确认删除合同管理表编号为"' + uuids + '"的数据项？').then(function() {
        return delContract(uuids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('sales/contract/export', {
        ...this.queryParams
      }, `采购合同数据.xlsx`)
    },
    /** 导入按钮操作 */
    handleImport() {
      this.upload.title = "供应商导入";
      this.upload.open = true;
    },
    /** 下载模板操作 */
    importTemplate() {
      this.download('sales/contract/importTemplate', {
      }, `合同数据信息模板.xlsx`)
    },
    // 文件上传中处理
    handleFileUploadProgress(event, file, fileList) {
      this.upload.isUploading = true;
    },
    // 文件上传成功处理
    handleFileSuccess(response, file, fileList) {
      this.upload.open = false;
      this.upload.isUploading = false;
      this.$refs.upload.clearFiles();
      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
      this.getList();
    },
    // 提交上传文件
    submitFileForm() {
      this.$refs.upload.submit();
    },
    nameSelect(e){
      let result = this.hbList.find(item => item.supplierCode ==e)
      console.log(result,"result");
      this.form.hbType = result.supplierCategory
      this.form.hbCode = result.supplierCode
      this.form.hbShuihao = result.supplierEin
      this.form.hbAddress = result.address
      this.form.hbPhone = result.supplierPhone
      this.form.hbBank = result.supplierBank
      this.form.hbCard = result.supplierAcc
      this.form.hbName2 = result.supplierContact
      this.form.hbName = result.supplierName
      this.form.hbPhone2 = result.supplierContactNumber

      // this.hbList.filter(item=>{})
    },
    handleOrder(){
      const loading = this.$loading({
        lock: true,
        text: '正在生成订单，请稍后...',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      const uuid = this.ids
      scOrder(uuid).then(response => {
        this.$modal.msgSuccess(response.msg);
        this.$router.push('/xmdd/xsdd/salesorder')
        loading.close();
      }).catch(reason=>{
        loading.close();
      });
    },
    tableRowClassName({row, rowIndex}) {
      if (row.isGenOrder === "0") {
        return 'warning-row';
      } else if (row.isGenOrder === "1") {
        return 'success-row';
      }
      return '';
    },
    showAnnex(row){
      window.open(process.env.VUE_APP_BASE_API+row.attach)
    },
    htInfo(row){
      let uuid = row.uuid
      getContractDetail(uuid).then(res=>{
        console.log(res,"resres")
        this.wuOpen = true
        this.itembzinfoList=res.data
      })
    },
  }
};
</script>
